/* 
 *
 */
package com.cory.boot;

import org.springframework.context.annotation.Bean;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
import com.cory.boot.annotation.BootApplication;

/**
 * @author xiongcong
 * @date 2020-01-02
 */
@BootApplication
public abstract class BaseApplication {
    
    @Bean
    public RestTemplate restTemplate() {
        RestTemplate template = new RestTemplate();
        SimpleClientHttpRequestFactory factory = (SimpleClientHttpRequestFactory) template.getRequestFactory();
        factory.setConnectTimeout(3000);
        factory.setReadTimeout(5000);
        return template;
    }
    
    
}
